package at.evonfc.data;

import java.util.ArrayList;
import java.util.List;

import android.util.Log;
import at.evonfc.db.DBSession;
import at.evonfc.db.DataBaseAccess;

public class Device {
	private int id;
	private String name;
	private int maxBorrowDate;
	
	private List<String> properties;
	private List<Equipment> availableEquipment;
	
	
	
	public Device(int id, String name, int maxBorrowDate,
			List<String> properties, List<Equipment> availableEquipment) {
		this.id = id;
		this.name = name;
		Log.v("test", name);
		this.maxBorrowDate = maxBorrowDate;
		this.properties = properties;
		this.availableEquipment = availableEquipment;
	}
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public int getMaxBorrowDate() {
		return maxBorrowDate;
	}
	
	public List<Equipment> getAvailableEquipment() {
		return availableEquipment;
	}
	
	@Override
	public boolean equals(Object o) {
		if(o instanceof Device) {
			Device d = (Device) o;
			if(d.getId() == this.id) {
				return true;
			}
		}
		return false;
	}
	
	
}
